<?php 
	echo $html->css( 'jquery-ui-1.8.16.custom.css' );
	$javascript->link( array( 'jquery/jquery-1-6-4', 'jquery/jquery-ui-1.8.16.custom.min', 'projects/index' ), false );
?>

<h1>Mis Proyectos</h1>

<div id="listTeams">
	<?php foreach( $listProjects as $listProject ) : ?>
		<div class="team">
			<?php echo $html->link( 'x', array( 'action' => 'delete', $listProject['Project']['id'] ), array( 'class' => 'deleteSchedule' ), null, null, 'Estas seguro de que deseas eliminar este proyecto ?' ) ?>
			<?php echo $html->image( 'folder.png' ); ?>
			<p><b><?php echo $html->link( $listProject['Project']['name'], array( 'action' => 'view', $listProject['Project']['id'] ), array( 'title' => $listProject['Project']['description'] ) ); ?></b></p>
		</div>
	<?php endforeach; ?>

	<div class="clear"></div>
</div>

<a href="#" id="showAddDialog" >Crear Proyecto</a>

<div style="display:none;" id="addProjectDialog" title="Nuevo Proyecto">
	<?php
		echo $form -> create('Project', array( 'action' => 'add' ));
		echo $form -> input('name');
		echo $form -> input('description');
		echo $form ->label('algorithm_id', 'Modo de Trabajo');
		echo $form -> select('algorithm_id', $listAlgorithms, 1, array( 'empty' => false ));
		echo $form -> end('Salvar');
	?>
</div>